<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Initialize a connection</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.gnupg-init" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gnupg_init</h1>
  <p class="verinfo">(PECL gnupg &gt;= 0.4)</p><p class="refpurpose"><span class="refname">gnupg_init</span> &mdash; <span class="dc-title">Initialize a connection</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.gnupg-init-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gnupg_init</strong></span>
    ( <span class="methodparam">void</span>
   ) : <span class="type">resource</span></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.gnupg-init-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.gnupg-init-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   A GnuPG <span class="type"><a href="language.types.resource.html" class="type resource">resource</a></span> connection used by other GnuPG functions.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.gnupg-init-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4188">
    <p><strong>Example #1 Procedural <span class="function"><strong>gnupg_init()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$res&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gnupg_init</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
   <div class="example" id="example-4189">
    <p><strong>Example #2 OO gnupg initializer example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$gpg&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">gnupg</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>